<template>
  <div class="page-container">
    <ex_super_table_page v-bind="option" ref="superTablePage">
    </ex_super_table_page>
  </div>
</template>
<script>


import superTablePageFunction from '@/mixin/super-table-page-function';

export default {

  title: "label_stock_age_query",
  components: {},

  mixins: [superTablePageFunction],
  data() {

    return {

      option: {
        search: {

          default: {
            accountDay: new Date().getTime()
          },
          model: [
            { label: "label_sku", key: "skuId", type: 'sku_selec_input' },

            {
              label: "label_warehouse", key: "warehouseId", type: 'base_warehouse_select', fold: false
            },

            {
              label: "label_statistical_time",
              key: "accountDay",
              type: 'date-picker',
              attrs: { type: "date" },
            },

          ],
        },
        action: [

        ],

        table: {
          url: '/fms-api/client/FmsClientRpc/queryTenantOrderDetails.json',
          model: [
   
            {
              key: 'skuOnlyCode', label: 'label_sku_only_code',align: 'left', 'min-width': 150,
              attrs: {
                formatter: (r, c, v, i) => r.skuId < 0 ? "——" : v
              }
            },
            {
              key: 'skuBarcode', label: 'label_sku_code',align: 'left', 'width': 150,
              attrs: {
                formatter: (r, c, v, i) => r.skuId < 0 ? "——" : v
              }
            },
            {
              key: 'skuName', label: 'label_sku_name_cn',align: 'left', 'width': 150,
              attrs: {
                formatter: (r, c, v, i) => r.skuId < 0 ? "——" : v
              }
            },
            {
              key: 'skuNameEn', label: 'label_sku_name_en',align: 'left', 'width': 150,
              attrs: {
                formatter: (r, c, v, i) => r.skuId < 0 ? "——" : v
              }
            },
            {
              key: 'totalQty', label: 'label_sum_stock', align: 'right', 'width': 100,
            },
            {
              key: 'skuAge', label: 'label_stock_age_days', align: 'right', 'width': 100,
            },
            {
              key: 'skuVolume', label: () => this.$addUnit(this.$t('label_unit_volume'), 'Cbm'), align: 'right', 'width': 120,
            },
            {
              key: 'totalVolume', label: () => this.$addUnit(this.$t('label_total_volume'), 'Cbm'), align: 'right', 'width': 120,
            },
            {
              key: 'putawayTime', label: 'label_stock_putaway_time', align: 'center', 'width': 140,
              attrs: {
                formatter: (r, c, v, i) => {
                  return this.$dateFormat(v)
                }
              }
            },
            {
              key: 'accountDay', label: 'label_statistical_date', 'width': 100,
              attrs: {
                formatter: (r, c, v, i) => {
                  return this.$dateFormatDate(v)
                }
              }
            },
            {
              key: 'warehouseCode', label: 'label_belong_warehouse', align: 'left', 'min-width': 150,
              attrs: {
                formatter: (r, c, v, i) => this.$formatNameCode(r.warehouseName, r.warehouseCode)
              }
            }
          ]
        }
      }

    };
  },

  created() {


  },


};

</script>
<style></style>
